<template>
  <div style="margin-top:2%">
    <div class="sidebar">
      <!-- 跳转到指定模块 -->
      <el-tabs v-model="activeName" @tab-click="handleClick" tab-position="left">
        <el-tab-pane label="事件详情" name="first">

          <!--   事件详情页面信息      -->
          <div style="margin-left: 1.5% ">

            <!--     药物储存相关      -->
            <div class="bname"
                 style=" font-weight:bold;font-size:18px;padding-top:0.5%">
              药物储存相关
            </div>
            <el-form ref="form" :model="form" label-width="130px" disabled>
              <el-form-item label="药物储存相关" :rules="[{required: true, message: '此项为必填'}]">
                <el-radio-group v-model="form.reportcategory">
                  <el-radio label="01">药物储存不当</el-radio>
                  <el-radio label="02">药品质量问题（含保存条件、过期）</el-radio>
                  <el-radio label="03">其他</el-radio>
                </el-radio-group>
              </el-form-item>
              <div v-show="form.reportcategory == '其他'">
                <el-form-item label="其他" style="margin-left: -3% ;label-width:130px;width: 600px">
                  <el-input
                    v-model="form.other"
                    placeholder="">
                  </el-input>
                </el-form-item>
              </div>
            </el-form>


            <!--事件情况描述-->
            <div>
              <div class="bname"
                   style=" font-weight:bold;font-size:18px;padding-top:0.5%">
                事件情况描述
              </div>
              <el-form ref="form" :model="form" label-width="130px" disabled>
                <el-form-item label="事件描述或事件经过" style="width: 600px" :rules="[{required: true, message: '此项为必填'}]"
                              label-width="130px">
                  <el-input v-model="form.details"></el-input>
                </el-form-item>
                <el-form-item label="事件发生时是否采取处理措施" :rules="[{required: true}]">
                  <el-radio-group v-model="form.treatmentMeasure">
                    <el-radio label="01">是</el-radio>
                    <el-radio label="02">否</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="采取的处理措施" label-width="130px" style="width: 600px">
                  <el-input v-model="form.treatmentMeasures" placeholder=" " type="textarea" :rows="2"
                            resize="none"></el-input>
                </el-form-item>
                <div v-show="form.treatmentMeasure == '是'">
                  <el-form-item label="事件引起的后果" label-width="130px" style="width: 600px">
                    <el-input
                      v-model="form.results"
                      placeholder="" type="textarea" :rows="2" resize="none">
                    </el-input>
                  </el-form-item>
                </div>
              </el-form>
            </div>

            <!--患者资料-->
            <div>
              <div class="bname"
                   style="font-weight:bold;font-size:18px;padding-top:0.5%">
                患者资料
              </div>
              <div class="block" style="margin-top: 0.5%;">
                <el-form ref="form" :model="form" label-width="140px" disabled>
                  <el-form-item label="是否涉及患者" :rules="[{required: true, }]">
                    <el-radio-group v-model="form.differentiate">
                      <el-radio label="01">是</el-radio>
                      <el-radio label="02">否</el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <div v-show="form.differentiate== '是'">
                    <el-form-item label="诊断类别" :rules="[{required: true, message: '患者信息未选择'}]">
                      <el-radio-group v-model="form.diagcategory">
                        <el-radio label="01">急诊</el-radio>
                        <el-radio label="02">门诊</el-radio>
                        <el-radio label="03">住院</el-radio>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item label="病历号/门诊号" :rules="[{required: true, message: '患者信息未选择'}]" label-width="140px"
                                  style="width: 600px">
                      <el-input v-model="form.recordNumber" placeholder=" "></el-input>
                    </el-form-item>
                    <el-form-item label="姓名" :rules="[{required: true, message: '患者姓名不能为空'}]" label-width="140px"
                                  style="width: 600px">
                      <el-input v-model="form.patientname"></el-input>
                    </el-form-item>
                    <el-form-item label="性别" :rules="[{required: true, message: '性别不能为空'}]">
                      <el-radio-group v-model="form.patientgender">
                        <el-radio label="01">男</el-radio>
                        <el-radio label="02">女</el-radio>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item label="出生日期">
                      <el-date-picker
                        v-model="form.birdate"
                        type="date"
                        placeholder="选择日期">
                      </el-date-picker>
                    </el-form-item>
                    <el-form-item label="年龄" label-width="140px" style="width: 600px">
                      <el-input v-model="form.patientage"></el-input>
<!--                      <el-form-item v-model="form.danwei">
                        <el-radio label="岁" value=" "></el-radio>
                        <el-radio label="月" value=" "></el-radio>
                        <el-radio label="天" value=" "></el-radio>
                        <el-radio label="小时" value=" "></el-radio>
                      </el-form-item>-->
                    </el-form-item>
                    <el-form-item label="年龄阶段">
                      <el-select v-model="form.agestage" placeholder="请选择" filterable>
                        <el-option
                          v-for="item in agestageoption"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="家属联系电话" style="width: 600px;">
                      <el-input v-model="form.familyContact"></el-input>
                    </el-form-item>
                    <el-form-item label="入院就诊时间">
                      <el-date-picker
                        v-model="form.admissionTime"
                        type="date"
                        placeholder="选择日期">
                      </el-date-picker>
                    </el-form-item>
                    <el-form-item label="科室">
                      <el-select v-model="form.processDepartment" placeholder="请选择">
                        <el-option
                          v-for="item in processDepartmentoption"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value">
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item label="床号" style="width: 600px;">
                      <el-input v-model="form.badno"></el-input>
                    </el-form-item>
                    <el-form-item label="护理级别">
                      <el-radio label="特级护理" value=" "></el-radio>
                      <el-radio label="Ⅰ级护理" value=" "></el-radio>
                      <el-radio label="Ⅱ级护理" value=" "></el-radio>
                      <el-radio label="Ⅲ级护理" value=" "></el-radio>
                    </el-form-item>
                    <el-form-item label="文化程度">
                      <el-radio label="研究生" value=" "></el-radio>
                      <el-radio label="大学本科" value=" "></el-radio>
                      <el-radio label="大学专科" value=" "></el-radio>
                      <el-radio label="中专（中技）" value=" "></el-radio>
                      <el-radio label="高中" value=" "></el-radio>
                      <el-radio label="初中" value=" "></el-radio>
                      <el-radio label="小学" value=" "></el-radio>
                      <el-radio label="文盲" value=" "></el-radio>
                    </el-form-item>
                    <el-form-item label="诊断(多个诊断之间用逗号隔开)" style="width: 600px;" label-width="130px">
                      <el-input v-model="form.diagnosis" type="textarea" :rows="2" resize="none"></el-input>
                    </el-form-item>
                  </div>
                </el-form>
              </div>
            </div>

            <!--事件基本信息-->
            <div>
              <div class="bname"
                   style="font-weight:bold;font-size:18px;padding-top:0.5%">
                事件基本信息
              </div>
              <div class="block" style="margin-top: 0.5%;">
                <el-form ref="form" :model="form" label-width="130px" disabled>
                  <el-form-item label="发生时间">
                    <el-date-picker
                      v-model="form.occurrenceTime"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-form-item>
                  <el-form-item label="发生日期">
                    <el-date-picker
                      v-model="form.occurrenceDate"
                      type="datetime"
                      placeholder="选择日期时间">
                    </el-date-picker>
                  </el-form-item>
                  <el-form-item label="日期类型">
                    <el-radio-group v-model="form.dateType">
                      <el-radio label="">工作日</el-radio>
                      <el-radio label="周末"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="发生时段">
                    <el-radio-group v-model="form.occurrencePeriod">
                      <el-radio label="上午(08:00-12:00)"></el-radio>
                      <el-radio label="中午(12:00-14:00)"></el-radio>
                      <el-radio label="下午(14:00-18:00)"></el-radio>
                      <el-radio label="上夜(18:00-00:00)"></el-radio>
                      <el-radio label="下夜(00:00-08:00)"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="发生地点" style="width: 600px">
                    <el-input v-model="form.place"></el-input>
                  </el-form-item>
                  <el-form-item label="现场照片" style="width: 600px">
                    <el-upload
                      action=""
                      :limit="500"
                      list-type="picture-card"
                      :on-exceed="handleExceed"
                      :before-upload="beforeUpload"
                      :on-remove="handleRemove"
                      :file-list="pList"
                    >
                      <i class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                  </el-form-item>
                </el-form>
              </div>
            </div>

            <!--             当事人资料    -->
            <div>
              <div class="bname"
                   style="font-weight:bold;font-size:18px;padding-top:0.5%">
                当事人资料
              </div>
              <el-form ref="form" :model="form" label-width="130px" disabled>
                <el-form-item label="姓名" style="width: 600px">
                  <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="年龄" style="width: 600px">
                  <el-input v-model="form.age"></el-input>
                </el-form-item>
                <el-form-item label="工作年限">
                  <el-radio-group v-model="form. workingSeniority">
                    <el-radio label="<1年"></el-radio>
                    <el-radio label="1≤y≤2"></el-radio>
                    <el-radio label="2≤y≤5"></el-radio>
                    <el-radio label="5≤y≤10"></el-radio>
                    <el-radio label="10≤y≤20"></el-radio>
                    <el-radio label="≥20年"></el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="类别">
                  <el-radio-group v-model="form.type">
                    <el-radio label="在编"></el-radio>
                    <el-radio label="聘用"></el-radio>
                    <el-radio label="进修"></el-radio>
                    <el-radio label="实习"></el-radio>
                    <el-radio label="轮转"></el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="学历">
                  <el-radio-group v-model="form.education">
                    <el-radio label="中专"></el-radio>
                    <el-radio label="大专"></el-radio>
                    <el-radio label="本科"></el-radio>
                    <el-radio label="硕士"></el-radio>
                    <el-radio label="其他"></el-radio>
                  </el-radio-group>
                </el-form-item>
                <div v-show="form.education==其他">
                  <el-form-item label="其他" style="width: 600px">
                    <el-input v-model="form.qita"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="职务">
                  <el-radio-group v-model="form.dutie">
                    <el-radio label="医疗"></el-radio>
                    <el-radio label="药剂"></el-radio>
                    <el-radio label="护理"></el-radio>
                    <el-radio label="医技"></el-radio>
                    <el-radio label="检验"></el-radio>
                    <el-radio label="工程技术"></el-radio>
                    <el-radio label="行政管理"></el-radio>
                    <el-radio label="后勤保障"></el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="职称">
                  <el-radio-group v-model="form.title">
                    <el-radio label="医士"></el-radio>
                    <el-radio label="医师"></el-radio>
                    <el-radio label="主治医师"></el-radio>
                    <el-radio label="副主任医师"></el-radio>
                    <el-radio label="主任医师"></el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-form>
            </div>

            <!--事件结果-->
            <div>
              <div class="bname"
                   style="font-weight:bold;font-size:18px;padding-top:0.5%">
                事件结果
              </div>
              <div class="block" style="margin-top: 0.5%;">
                <el-form ref="form" :model="form" label-width="130px" disabled>
                  <el-form-item label="纠纷或纠纷隐患可能性" :rules="[{required: true, message: '纠纷或纠纷隐患可能性未选择'}]">
                    <el-radio-group v-model="form.jiuImpossible">
                      <el-radio label="确定有"></el-radio>
                      <el-radio label="可能有"></el-radio>
                      <el-radio label="无"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="事件严重程度">
                    <el-select v-model="form.thingSerious" placeholder="请选择" filterable>
                      <el-option
                        v-for="item in thingSeriousOption"
                        :key="item.value"
                        :label="item.value"
                        :value="item.value">
                      </el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="事件分级" style="width: 600px">
                    <el-radio-group v-model="form.thingFenji">
                      <el-radio label="Ⅰ级事件: 发生错误，造成患者死亡 (包括损害程度I级)"
                                style="margin-top: 10px; margin-bottom: 10px"></el-radio>
                      <el-radio label="Ⅱ级事件: 发生错误，且造成患者伤害 (包括损害程度E、F、G、H级)"
                                style="margin-bottom: 10px"></el-radio>
                      <el-radio label="Ⅲ级事件: 发生错误，但未造成患者伤害 (包括损害程度B、C、D级)" style="margin-bottom: 10px"></el-radio>
                      <el-radio label="Ⅳ级事件: 错误未发生 (错误隐患)(包括损害程度A级)"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="伤害严重度">
                    <el-radio-group v-model="form.hurtDu">
                      <el-radio label="死亡"></el-radio>
                      <el-radio label="极度严重"></el-radio>
                      <el-radio label="重度"></el-radio>
                      <el-radio label="中度"></el-radio>
                      <el-radio label="轻度"></el-radio>
                      <el-radio label="未造成伤害"></el-radio>
                      <el-radio label="无伤害"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-form>
              </div>
            </div>

            <!--报告者信息-->
            <div>
              <div class="bname"
                   style="font-weight:bold;font-size:18px;padding-top:0.5%">
                报告者信息
              </div>
              <div class="block" style="margin-top: 0.5%;">
                <el-form ref="form" :model="form" label-width="130px" disabled>
                  <el-form-item label="事件承包方式" :rules="[{required: true, message: '纠纷或纠纷隐患可能性未选择'}]">
                    <el-radio-group v-model="form.eventContracting">
                      <el-radio label="主动呈报"></el-radio>
                      <el-radio label="投诉"></el-radio>
                      <el-radio label="他人报告"></el-radio>
                      <el-radio label="质量检查发现"></el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="其他备注信息" style="width: 600px">
                    <el-input v-model="form.otheRemarks" type="textarea" :rows="2" resize="none"></el-input>
                  </el-form-item>
                  <el-form-item label="附件图片" style="width: 600px">
                    <el-upload
                      action=""
                      :limit="500"
                      list-type="picture-card"
                      :on-exceed="handleExceed"
                      :before-upload="beforeUpload"
                      :on-remove="handleRemove"
                      :file-list="viewList"
                    >
                      <i class="el-icon-plus avatar-uploader-icon"></i>
                    </el-upload>
                  </el-form-item>
                </el-form>
              </div>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="事件摘要" name="second">
          <div style="margin-left: 1.5%">
            <div class="bname" style=" font-size:16px ;border-top: 1px ;padding-top:0.5%">事件摘要详情</div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="呈送事件" name="third">
          <div style="margin-left: 1.5%">
            <div class="bname" style=" font-size:16px ;border-top: 1px ;padding-top:0.5%">呈送事件详情
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="分析报告" name="fourth">
          <div style="margin-left: 1.5%;padding-top:0.5%">
            <el-button type="primary" @click="handleAdd" size="small">填写分析报告</el-button>
            <div style="font-size: 20px;font-weight:bold;margin-top: 20px;">报告还未填写，暂无内容显示！</div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="处理建议" name="fifth">
          <div style="margin-left: 1.5%">
            <div class="bname" style=" font-size:16px ;border-top: 1px ;padding-top:0.5%">处理建议详情
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="事件追踪" name="sixth">
          <div style="margin-left: 1.5%">
            <div class="bname" style=" font-size:16px ;border-top: 1px ;padding-top:0.5%">事件追踪详情
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="事件结案" name="seventh">
          <div style="margin-left: 1.5%">
            <div class="bname" style=" font-size:16px ;border-top: 1px ;padding-top:0.5%">事件结案详情
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>

    <!--  分析报告的弹窗显示  -->
    <el-dialog :visible.sync="innerVisible" width="100%" class="dialogBody">
      <!--页面提示-->
      <div class="tname">填写/编辑分析报告</div>
      <el-form :model="form1" label-width="150px">
        <!--相关重要信息-->
        <div style="font-size: 20px ;font-weight: bold; border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          协助部门意见
        </div>
        <!--         协助部门意见-->
        <div style="margin-top: 20px">
          <el-form-item label="协助部门一" class="tDepartmentComment" prop="supportDepartmentOne">
            <el-select v-model="form1.supportDepartmentOne" placeholder="请选择">
              <el-option
                v-for="item in assistDepartment1option"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="协助部门二" prop="supportDepartmentTwo">
            <el-select v-model="form1.supportDepartmentTwo" placeholder="请选择">
              <el-option
                v-for="item in assistDepartment2option"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </div>
        <div style="font-size: 20px ;font-weight: bold;border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          科室讨论情况
        </div>
        <div style="margin-top: 20px">
          <el-form-item label="科室讨论日期" :rules="[{required: true, message: '此项为必填项，请你录入'}]"
                        prop="discussionDepartmentDate">
            <div class="block">
              <el-date-picker
                v-model="form1.discussionDepartmentDate"
                type="date"
                placeholder="选择日期">
              </el-date-picker>
            </div>
          </el-form-item>
          <el-form-item label="地点" prop="discussionSite">
            <el-input v-model="form1.discussionSite"></el-input>
          </el-form-item>
          <el-form-item label="参加讨论人员" prop="discussionPanelist" :rules="[{required: true, message: '此项为必填项，请你录入'}]">
            <el-input v-model="form1.discussionPanelist" type="textarea" :rows="2" resize="none"></el-input>
          </el-form-item>
        </div>
        <!-- 科室讨论意见-->
        <div class="bname"
             style="font-size: 20px ;font-weight: bold;border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          科室讨论意见
        </div>
        <div style="margin-top: 20px">
          <el-form-item label="事件是否累计患者" prop="discussionInvolvesPatient">
            <el-radio-group v-model="form1.discussionInvolvesPatient">
              <el-radio label="01">是</el-radio>
              <el-radio label="02">否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="是否给患者造成伤害" prop="discussionHurtPatient" :rules="[{required: true}]">
            <el-radio-group v-model="form1.discussionHurtPatient">
              <el-radio label="01">是</el-radio>
              <el-radio label="02">否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="患者是否知晓" prop="discussionPatientKnows" :rules="[{required: true}]">
            <el-radio-group v-model="form1.discussionPatientKnows">
              <el-radio label="01">是</el-radio>
              <el-radio label="02">否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="家属是否知晓" prop="discussionFamilyKnows" :rules="[{required: true}]">
            <el-radio-group v-model="form1.discussionFamilyKnows">
              <el-radio label="01">是</el-radio>
              <el-radio label="02">否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="是否存在纠纷隐患" prop="discussionPotentialDispute" :rules="[{required: true}]">
            <el-radio-group v-model="form1.discussionPotentialDispute">
              <el-radio label="01">是</el-radio>
              <el-radio label="02">否</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="科室讨论定性等级" prop="discussionQualitativeLevels">
            <el-radio-group v-model="form1.discussionQualitativeLevels">
              <el-radio label="01">医疗事故</el-radio>
              <el-radio label="02">差错</el-radio>
              <el-radio label="03">医疗缺陷</el-radio>
              <el-radio label="04">意外事件</el-radio>
              <el-radio label="05">其他</el-radio>
            </el-radio-group>
          </el-form-item>
          <div v-show="form1.discussionQualitativeLevels == '01'">
            <el-form-item label="医疗事故">
              <el-radio-group v-model="form1.yiliaoshigu">
                <el-radio label="01">一级医疗事故</el-radio>
                <el-radio label="02">二级医疗事故</el-radio>
                <el-radio label="03">三级医疗事故</el-radio>
                <el-radio label="04">四级医疗事故</el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
          <div v-show="form1.discussionQualitativeLevels == '02'">
            <el-form-item label="医疗事故">
              <el-radio-group v-model="form1.chacuo">
                <el-radio label="01">严重差错</el-radio>
                <el-radio label="02">一般差错</el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
          <div v-show="form1.discussionQualitativeLevels == '03'">
            <el-form-item label="医疗事故">
              <el-radio-group v-model="form1.quexian">
                <el-radio label="01">重度</el-radio>
                <el-radio label="02">中度</el-radio>
                <el-radio label="03">轻度</el-radio>
              </el-radio-group>
            </el-form-item>
          </div>
          <el-form-item label="科室处理意见" prop="discussionHandSuggestion"
                        :rules="[{required: true, message: '此项为必填项，请你录入'}]">
            <el-input v-model="form1. discussionHandSuggestion" type="textarea" :rows="2" resize="none"></el-input>
          </el-form-item>
        </div>
        <div class="bname"
             style="font-size: 20px ;font-weight: bold;border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          可能发生原因
        </div>
        <div class="border">
          <div class="border-title">
            <span>人</span>
          </div>
        </div>
        <div style="margin-top: 20px">
          <el-form-item label="医护人员" prop="possibleCausesWorkers">
            <el-checkbox-group v-model="form1.possibleCausesWorkers" @change="outputSelectedValues">
              <el-checkbox label="01">员工疏忽</el-checkbox>
              <el-checkbox label="02">风险意识不强</el-checkbox>
              <el-checkbox label="03">临床经验不足</el-checkbox>
              <el-checkbox label="04">临床培训不足</el-checkbox>
              <el-checkbox label="05">与患者/家属缺乏沟通</el-checkbox>
              <el-checkbox label="06">工作量过大</el-checkbox>
              <el-checkbox label="07">精力不足/注意力不集中</el-checkbox>
              <el-checkbox label="08">责任心不强</el-checkbox>
              <el-checkbox label="09">人力未达预期配置</el-checkbox>
              <el-checkbox label="10">缺乏完整、准确评估</el-checkbox>
              <el-checkbox label="11">未做双核对</el-checkbox>
              <el-checkbox label="12">未依照标准操作流程</el-checkbox>
              <el-checkbox label="13">缺乏标准操作</el-checkbox>
              <el-checkbox label="14">违反操作规范</el-checkbox>
              <el-checkbox label="15">环境设备不熟悉</el-checkbox>
              <el-checkbox label="16">未向患者/家属宣教</el-checkbox>
              <el-checkbox label="17">宣教方式或技巧不对</el-checkbox>
              <el-checkbox label="18">未落实交接班制度</el-checkbox>
              <el-checkbox label="19">医护团队间沟通不足</el-checkbox>
              <el-checkbox label="20">未注意特殊时段病房巡视</el-checkbox>
              <el-checkbox label="21">未插高危警示标识</el-checkbox>
              <el-checkbox label="22">未进行监督</el-checkbox>
              <el-checkbox label="23">未告知患者完整信息</el-checkbox>
              <el-checkbox label="24">医疗器械操作不当</el-checkbox>
              <el-checkbox label="25">服务态度不好</el-checkbox>
              <el-checkbox label="26">采用不适当的信息</el-checkbox>
              <el-checkbox label="27">有不合格人员执行</el-checkbox>
              <el-checkbox label="28">违反医疗规章制度</el-checkbox>
              <el-checkbox label="29">给药核对不规范</el-checkbox>
              <el-checkbox label="30">安全意识差、惯性思维严重</el-checkbox>
              <el-checkbox label="31">对医嘱核对重要性认识不足</el-checkbox>
              <el-checkbox label="32">未做到医嘱班班核对</el-checkbox>
              <el-checkbox label="33">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <!--    测试      -->

          <el-form-item label="医护人员" prop="possibleCausesWorkers2">
            <el-checkbox-group v-model="form1.possibleCausesWorkers2">
              <el-checkbox label="01" disabled>员工疏忽</el-checkbox>
              <el-checkbox label="02" disabled>风险意识不强</el-checkbox>
              <el-checkbox label="03" disabled>临床经验不足</el-checkbox>
              <el-checkbox label="04" disabled>临床培训不足</el-checkbox>
              <el-checkbox label="05" disabled>与患者/家属缺乏沟通</el-checkbox>
              <el-checkbox label="06" disabled>工作量过大</el-checkbox>
              <el-checkbox label="07" disabled>精力不足/注意力不集中</el-checkbox>
              <el-checkbox label="08" disabled>责任心不强</el-checkbox>
              <el-checkbox label="09" disabled>人力未达预期配置</el-checkbox>
              <el-checkbox label="10" disabled>缺乏完整、准确评估</el-checkbox>
              <el-checkbox label="11" disabled>未做双核对</el-checkbox>
              <el-checkbox label="12" disabled>未依照标准操作流程</el-checkbox>
              <el-checkbox label="13" disabled>缺乏标准操作</el-checkbox>
              <el-checkbox label="14" disabled>违反操作规范</el-checkbox>
              <el-checkbox label="15" disabled>环境设备不熟悉</el-checkbox>
              <el-checkbox label="16" disabled>未向患者/家属宣教</el-checkbox>
              <el-checkbox label="17" disabled>宣教方式或技巧不对</el-checkbox>
              <el-checkbox label="18" disabled>未落实交接班制度</el-checkbox>
              <el-checkbox label="19" disabled>医护团队间沟通不足</el-checkbox>
              <el-checkbox label="20" disabled>未注意特殊时段病房巡视</el-checkbox>
              <el-checkbox label="21" disabled>未插高危警示标识</el-checkbox>
              <el-checkbox label="22" disabled>未进行监督</el-checkbox>
              <el-checkbox label="23" disabled>未告知患者完整信息</el-checkbox>
              <el-checkbox label="24" disabled>医疗器械操作不当</el-checkbox>
              <el-checkbox label="25" disabled>服务态度不好</el-checkbox>
              <el-checkbox label="26" disabled>采用不适当的信息</el-checkbox>
              <el-checkbox label="27" disabled>有不合格人员执行</el-checkbox>
              <el-checkbox label="28" disabled>违反医疗规章制度</el-checkbox>
              <el-checkbox label="29" disabled>给药核对不规范</el-checkbox>
              <el-checkbox label="30" disabled>安全意识差、惯性思维严重</el-checkbox>
              <el-checkbox label="31" disabled>对医嘱核对重要性认识不足</el-checkbox>
              <el-checkbox label="32" disabled>未做到医嘱班班核对</el-checkbox>
              <el-checkbox label="33" disabled>其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <el-form-item label="患者" prop="possibleCausesPatient">
            <el-checkbox-group v-model="form1.possibleCausesPatient">
              <el-checkbox label="01">身体虚弱</el-checkbox>
              <el-checkbox label="02">未遵从遗嘱/遵医行为差</el-checkbox>
              <el-checkbox label="03">意识或认知障碍</el-checkbox>
              <el-checkbox label="04">肢体行动障碍</el-checkbox>
              <el-checkbox label="05">躁动</el-checkbox>
              <el-checkbox label="06">步态不稳</el-checkbox>
              <el-checkbox label="07">高危患者执意下床活动</el-checkbox>
              <el-checkbox label="08">患者过度高估自己的活动能力</el-checkbox>
              <el-checkbox label="09">约束不当</el-checkbox>
              <el-checkbox label="10">隐瞒有关病史/用药史</el-checkbox>
              <el-checkbox label="11">提供错误病史/用药史</el-checkbox>
              <el-checkbox label="12">高血压/位体性低血压</el-checkbox>
              <el-checkbox label="13">眩晕感</el-checkbox>
              <el-checkbox label="14">视力障碍</el-checkbox>
              <el-checkbox label="15">记忆力、理解能力差</el-checkbox>
              <el-checkbox label="16">疾病因素</el-checkbox>
              <el-checkbox label="17">使用药物因素</el-checkbox>
              <el-checkbox label="18">患者饮酒</el-checkbox>
              <el-checkbox label="19">患者自理能力差</el-checkbox>
              <el-checkbox label="20">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <el-form-item label="家属/陪护" prop="possibleCausesFamily">
            <el-checkbox-group v-model="form1.possibleCausesFamily" >
              <el-checkbox label="01">防护意识差，思想不重视</el-checkbox>
              <el-checkbox label="02">对医护人员的安全告知遵从性低</el-checkbox>
              <el-checkbox label="03">陪伴缺失</el-checkbox>
              <el-checkbox label="04">无陪伴时未告知护士</el-checkbox>
              <el-checkbox label="05">陪护之间交接不全面</el-checkbox>
              <el-checkbox label="06">频繁更换，且未交接相关注意事项</el-checkbox>
              <el-checkbox label="07">家属护理不当</el-checkbox>
              <el-checkbox label="08">擅自松解约束带</el-checkbox>
              <el-checkbox label="09">视力或认知障碍</el-checkbox>
              <el-checkbox label="10">知识缺乏</el-checkbox>
              <el-checkbox label="11">家属不重视，保守治疗</el-checkbox>
              <el-checkbox label="12">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <div class="border">
            <div class="border-title">
              <span>机</span>
            </div>
          </div>
          <el-form-item label="器材设备" prop="possibleCausesEquipment">
            <el-checkbox-group v-model="form1.possibleCausesEquipment" >
              <el-checkbox label="01">器械设备故障或工作异常</el-checkbox>
              <el-checkbox label="02">未有异常警示系统</el-checkbox>
              <el-checkbox label="03">异常警示系统问题</el-checkbox>
              <el-checkbox label="04">信息系统问题</el-checkbox>
              <el-checkbox label="05">器械设备安装、放置不当</el-checkbox>
              <el-checkbox label="06">器械设备过度使用</el-checkbox>
              <el-checkbox label="07">辅助功能障碍</el-checkbox>
              <el-checkbox label="08">器械设备质量不合格</el-checkbox>
              <el-checkbox label="09">器械设备管理问题</el-checkbox>
              <el-checkbox label="10">器械设备未做定期检测和维护</el-checkbox>
              <el-checkbox label="11">缺乏适当的工具/设备</el-checkbox>
              <el-checkbox label="12">器械设备设计不合理/不合格</el-checkbox>
              <el-checkbox label="13">缺乏适合的个人安全防护</el-checkbox>
              <el-checkbox label="14">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <div class="border">
            <div class="border-title">
              <span>料</span>
            </div>
          </div>
          <el-form-item label="耗材药品" prop="possibleCausesConsumableDrug">
            <el-checkbox-group v-model="form1.possibleCausesConsumableDrug" >
              <el-checkbox label="01">型号错误</el-checkbox>
              <el-checkbox label="02">保质期已过</el-checkbox>
              <el-checkbox label="03">真伪存疑</el-checkbox>
              <el-checkbox label="04">进院前是否检验</el-checkbox>
              <el-checkbox label="05">使用方法不符合规定</el-checkbox>
              <el-checkbox label="06">使用环境不对</el-checkbox>
              <el-checkbox label="07">使用材料与机器不匹配</el-checkbox>
              <el-checkbox label="08">使用材料与其他材料互相影响</el-checkbox>
              <el-checkbox label="09">药名相似</el-checkbox>
              <el-checkbox label="10">读音相似</el-checkbox>
              <el-checkbox label="11">外观相似</el-checkbox>
              <el-checkbox label="12">库位临近</el-checkbox>
              <el-checkbox label="13">拼音缩写相似</el-checkbox>
              <el-checkbox label="14">打印不清</el-checkbox>
              <el-checkbox label="15">使用特殊药物</el-checkbox>
              <el-checkbox label="16">给药设备、物品不足</el-checkbox>
              <el-checkbox label="17">药品标识不清</el-checkbox>
              <el-checkbox label="18">药品过期、变质或毁损</el-checkbox>
              <el-checkbox label="19">药物有多种剂型</el-checkbox>
              <el-checkbox label="20">用法不清</el-checkbox>
              <el-checkbox label="21">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <div class="border">
            <div class="border-title">
              <span>法</span>
            </div>
          </div>
          <el-form-item label="流程制度" prop="possibleCausesProcessSystem">
            <el-checkbox-group v-model="form1.possibleCausesProcessSystem" >
              <el-checkbox label="01">监管不到位</el-checkbox>
              <el-checkbox label="02">无相关管理制度</el-checkbox>
              <el-checkbox label="03">护理宣传不到位</el-checkbox>
              <el-checkbox label="04">核心制度落实不到位</el-checkbox>
              <el-checkbox label="05">流程不合理</el-checkbox>
              <el-checkbox label="06">缺评估流程</el-checkbox>
              <el-checkbox label="07">缺复核流程</el-checkbox>
              <el-checkbox label="08">无标准化操作流程</el-checkbox>
              <el-checkbox label="09">输液处理不规范</el-checkbox>
              <el-checkbox label="10">手术操作不当</el-checkbox>
              <el-checkbox label="11">无菌操作不规范</el-checkbox>
              <el-checkbox label="12">岗位职责设置不合理</el-checkbox>
              <el-checkbox label="13">相关流程制度无培训</el-checkbox>
              <el-checkbox label="14">相关流程制度培训不足</el-checkbox>
              <el-checkbox label="15">相关流程制度无考核</el-checkbox>
              <el-checkbox label="16">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <div class="border">
            <div class="border-title">
              <span>环</span>
            </div>
          </div>
          <el-form-item label="环境" prop="possibleCausesEnvironment">
            <el-checkbox-group v-model="form1.possibleCausesEnvironment" >
              <el-checkbox label="01">存在安全隐患</el-checkbox>
              <el-checkbox label="02">缺乏环境安全防护</el-checkbox>
              <el-checkbox label="03">未设置警示标识</el-checkbox>
              <el-checkbox label="04">地面湿滑</el-checkbox>
              <el-checkbox label="05">支撑物不牢固</el-checkbox>
              <el-checkbox label="06">照明缺失或不良</el-checkbox>
              <el-checkbox label="07">通道有障碍物</el-checkbox>
              <el-checkbox label="08">空间过窄</el-checkbox>
              <el-checkbox label="09">自然灾害</el-checkbox>
              <el-checkbox label="10">货位相邻</el-checkbox>
              <el-checkbox label="11">找不到人协助</el-checkbox>
              <el-checkbox label="12">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>

        </div>
        <!--  预防此类事件再发生的措施和方法-->
        <div class="bname"
             style="font-size: 20px ;font-weight: bold;border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          预防此类事件再发生的措施和方法
        </div>
        <div style="margin-top: 20px">
          <el-form-item label="加强教育培训" prop="measureStrengthenEducation">
            <el-checkbox-group v-model="form1.measureStrengthenEducation" >
              <el-checkbox label="01">医护人员临床教育培训</el-checkbox>
              <el-checkbox label="02">提供就诊者及家属适当宣教</el-checkbox>
              <el-checkbox label="03">改变医护人员工作态度</el-checkbox>
              <el-checkbox label="04">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>

          <el-form-item label="改善医疗护理管理" prop="measureCareManagement">
            <el-checkbox-group v-model="form1.measureCareManagement">
              <el-checkbox label="01">制定适宜的安全制度</el-checkbox>
              <el-checkbox label="02">制定标准的操作规范</el-checkbox>
              <el-checkbox label="03">临床操作流程改善</el-checkbox>
              <el-checkbox label="04">HIS系统修订</el-checkbox>
              <el-checkbox label="05">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>

          <el-form-item label="改善行政管理" prop="measureImproveAdministration">
            <el-checkbox-group v-model="form1.measureImproveAdministration" >
              <el-checkbox label="01">完善医院行政制度</el-checkbox>
              <el-checkbox label="02">完善医院行政流程</el-checkbox>
              <el-checkbox label="03">建立检测制度</el-checkbox>
              <el-checkbox label="04">人力配置改善</el-checkbox>
              <el-checkbox label="05">环境设备改善</el-checkbox>
              <el-checkbox label="06">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>

          <el-form-item label="加强沟通方式" prop="measureStrengthenCommunication">
            <el-checkbox-group v-model="form1.measureStrengthenCommunication" >
              <el-checkbox label="01">增加员工之间的沟通</el-checkbox>
              <el-checkbox label="02">改善行政沟通系统</el-checkbox>
              <el-checkbox label="03">改善与就诊者沟通模式</el-checkbox>
              <el-checkbox label="04">其他</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
        </div>
        <div class="bname"
             style="font-size: 20px ;font-weight: bold;border-top: 1px solid rgba(165,169,175,0.29);padding-top:0.5%">
          附件信息
        </div>
        <div style="margin-top: 20px">
          <el-form-item label="处理图片" prop="disposePhoto">
            <el-upload
              action=""
              :limit="500"
              list-type="picture-card"
              :on-exceed="handleExceed"
              :before-upload="beforeUpload"
              :on-remove="handleRemove"
              :file-list="fileList"
            >
              <i class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
          </el-form-item>
        </div>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button size="small" @click="cancel">取 消</el-button>
      </div>
    </el-dialog>


  </div>

</template>

<script>
export default {
  name: "shijianxiangqing",
  data() {
    return {

      form: {
        reportcategory: '',
        other: '',
        details: '',
        treatmentMeasure: '',
        treatmentMeasures: '',
        results: '',
        differentiate: '是',
        diagcategory: '',
        badno: '',
        patientname: '',
        patientgender: '',
        birdate: '',
        patientage: '',
        agestage: '',
        familyContact: '',
        admissionTime: '',
        processDepartment: '',
        recordNumber: '',
        diagnosis: '',
        occurrenceTime: '',
        occurrenceDate: '',
        dateType: '',
        occurrencePeriod: '',
        place: '',
        name: '',
        age: '',
        workingSeniority: '',
        type: '',
        education: '',
        qita: '',
        dutie: '',
        title: '',
        jiuImpossible: '',
        thingSerious: '',
        thingFenji: '',
        hurtDu: '',
        eventContracting: '',
        otheRemarks: '',
        danwei: '',
      },
      labels: [],
      pList: [],
      filelist: [],
      viewList: [],
      activeName: 'first',
      innerVisible: false,
      form1: {
        possibleCausesWorkers2:[],
        reportEventId: null,
        supportDepartmentOne: null,
        supportDepartmentTwo: null,
        discussionDepartmentDate: null,
        discussionSite: null,
        discussionPanelist: null,
        discussionInvolvesPatient: null,
        discussionHurtPatient: null,
        discussionPatientKnows: null,
        discussionFamilyKnows: null,
        discussionPotentialDispute: null,
        discussionQualitativeLevels: null,
        discussionMedicalMalpractice: null,
        discussionHandSuggestion: null,
        possibleCausesWorkers: [],
        possibleCausesPatient: [],
        possibleCausesFamily: [],
        possibleCausesEquipment: [],
        possibleCausesConsumableDrug: [],
        possibleCausesProcessSystem: [],
        possibleCausesEnvironment: [],
        measureStrengthenEducation: [],
        measureCareManagement: [],
        measureImproveAdministration: [],
        measureStrengthenCommunication: [],
        disposePhoto: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null,
        note6: null,
        note7: null,
        note8: null,
        note9: null,
        note10: null,
        creationTime: null,
        userId: null,
        deptId: null
      },
      agestageoption: [
        {value: '新生儿',},
        {value: '1-6月'},
        {value: '7-12月'},
        {value: '1-6岁'},
        {value: '其他'}
      ],
      assistDepartment1option: [
        {value: '护理部',},
        {value: '儿科'},
        {value: '信息科'},
        {value: '妇产科'},
        {value: '神经科'}
      ],
      processDepartmentoption: [
        {value: '护理部',},
        {value: '儿科'},
        {value: '信息科'},
        {value: '妇产科'},
        {value: '神经科'}
      ],
      assistDepartment2option: [
        {value: '护理部',},
        {value: '儿科'},
        {value: '信息科'},
        {value: '妇产科'},
        {value: '神经科'}
      ],
      thingSeriousOption: [
        {
          value: 'A级:客观环境或条件可能引发不良事件(不良事件隐患)',
        }, {
          value: 'B级:不良事件发生但未累及患者',
        }],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [{
          text: '今天',
          onClick(picker) {
            picker.$emit('pick', new Date());
          }
        }, {
          text: '昨天',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
          }
        }, {
          text: '一周前',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
          }
        }]
      },
      value1: '',
    }
  },
  methods: {
    outputSelectedValues() {
      console.log(this.form1.possibleCausesWorkers); // 输出选中的值
      let str = this.popCheckbox(this.form1.possibleCausesWorkers);
      console.log(str);
      this.form1.possibleCausesWorkers2 = this.pushCheckbox(str);
    },
    pushCheckbox(str) {
      const boxlist = str.split(",");
      return boxlist;
    },
    popCheckbox(boxlist) {
      let str = '';
      for (let i = 0; i < boxlist.length; i++) {
        if (i == 0) {
          str = boxlist[i];
        } else {
          str = str + ',' + boxlist[i];
        }
      }
      return str;
    },

    handleRemove(file) {
      this.fileList = this.fileList.filter(item => item.uid !== file.uid);
    },
    handleExceed() {
      this.msgError("最多只能传500张照片");
    },
    beforeUpload(file) {
      const isJPG = file.type === "image/jpeg" || file.type === "image/png";
      const isLt2M = file.size / 1024 / 1024 < 2;
      if (!isJPG) {
        this.$message.error("上传头像图片只能是 JPG 或 PNG 格式!");
        return;
      }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 2MB!");
        return;
      }
      const fileData = new FormData();
      fileData.append("avatar", file);
      //upload为上传的接口
      upload(fileData).then(res => {
        this.imgUrl = res.imgUrl;
        //对返回的图片地址进行回显
        this.$set(this.form, "avatar", this.imgUrl);
      });
      //阻止传到本地浏览器
      return false;
    },
    cancel() {
      this.innerVisible = false
    },
    handleAdd() {
      this.innerVisible = true
    },

  }

}
</script>

<style scoped>
.sidebar {
  margin-left: 3%;
}

.tname {
  font-size: 20px;
  font-weight: normal;
  height: 60px;
  margin-top: -30px;
}

.border {
  margin-top: 25px;
  border-top: 1px solid rgba(165, 169, 175, 0.29);
}

.border-title {
  width: 40px;
  height: 35px;
  background: white;
  text-align: center;
  margin-top: -12px;
  margin-left: 35px;
  font-weight: bold;
}
</style>






